#ifndef DICTIONARYMANAGER_H
#define DICTIONARYMANAGER_H

#include "Entity/DictData.h"
#include "Entity/DictType.h"
#include "api/systemManager/dictionarymanagerapi.h"
#include <QObject>
#include <Utils.h>
#include <ui_index.h>

class DictionaryManager : public QObject
{
    Q_OBJECT
public:
    explicit DictionaryManager(Ui::Index *ui,QObject *parent = nullptr);

signals:

private slots:
    void pageSizeChanged(int index);
    void deleteByIds();

private:
    Ui::Index *ui;
    Utils utils;
    QList<DictData> dictList;
//    int pageNum = 1;
    int pageSize = 10;
    int total;
    int currentPage = 1;
    int totalPage;
    DictionaryManagerApi dictionaryManagerApi;
    QList<DictType> dictTypeList;

    void init();
    void getDictList();
    void initSearchArea();
    void getList();
    void initTable();
    void initPageInfo();
};

#endif // DICTIONARYMANAGER_H
